import Vue from 'vue'
import Vuex from 'vuex'
  
Vue.use(Vuex)



const store = new Vuex.Store({
	state:{
		pathId: sessionStorage.getItem('pathId') || '',
		product: sessionStorage.getItem('product') || '',
		userPhone: sessionStorage.getItem('userPhone') || '',
  	},
	mutations:{
		SET_PATHID(state,data){
			state.pathId = data
			window.sessionStorage.setItem("pathId",data)
		},
		SET_PRODUCT(state,data){
			state.product = data
			window.sessionStorage.setItem("product",data)
		},
		SET_PHONE(state,data){
			state.userPhone = data
			window.sessionStorage.setItem("userPhone",data)
		},
	},
})
  
export default store
